package com.zoro.barn.inner.service.documentsql.document.dao;

import com.zoro.barn.commons.db.annotations.MybatisMapper;
import com.zoro.barn.commons.db.annotations.NeedPage;
import com.zoro.barn.inner.service.documentsql.document.entity.DocumentInfo;

import java.util.List;

/**
 * @author zhaoxingwu
 */
@MybatisMapper
public interface DocumentInfoMapper {

    /**
     * calculate how many sql related to one product, and include project sql
     *
     * @param product product id
     * @return number
     */
    Integer countByProduct(String product);

    /**
     * calculate how many sql related to one project but don't include product sql
     *
     * @param project project id
     * @return number
     */
    Integer countByProject(String project);

    /**
     * 用于测试
     * @return data
     */
    @NeedPage
    List<DocumentInfo> test();

}
